package com.lei.design.command.light;

/**
 * @Author LeiXiaoLei
 * @Date 2022/5/20 10:49
 * @Version 1.0
 */
public class Light {
    private int status = 0;
    private String name;

    public Light(String name) {
        this.name = name;
    }
    public void off() {
        status = 0;
        System.out.println(name + "is off");
    }

    public void on() {
        status = 1;
        System.out.println(name + "is on");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
